﻿using System.Collections;

namespace Scenario.WorkflowEngine.Scheduler.Data
{
    /// <summary>
    /// Helper class for Person entities.
    /// </summary>
    public class ExchangeItemHelper : Helper
    {
        public ExchangeItem Select(int id)
        {
            return (ExchangeItem)Mapper().QueryForObject("Select", id);
        }

        public IList SelectItemToWork()
        {
            return Mapper().QueryForList("SelectItemToWork", null);
        }

        public int MarkAsWorked(int id)
        {
            return Mapper().Update("MarkAsWorked", id);
        }

        public int Insert(ExchangeItem item)
        {
            Mapper().Insert("Insert", item);
            return 1;
        }

        public int Update(ExchangeItem item)
        {
            return Mapper().Update("Update", item);
        }

        public int Delete(int id)
        {
            return Mapper().Delete("Delete", id);
        }

    }
}